#ifndef _CONFIG_HPP_
#define _CONFIG_HPP_

#include <string>
#include <vector>
#include "cJSON.h"

class AppConfig {
public:
	struct RedisConfig {
		std::string host;
		int         port = 0;
	};

	struct Service {
		int         id = 0;
		std::string service;
		bool        enabled = false;
	};

	std::string          name;
	int                  port = 0;
	RedisConfig          redis;
	std::vector<Service> services;

	static AppConfig parse(const std::string &filename);
	void             print() const;
};

#endif // _CONFIG_HPP_